URLSession
extension Reactive where Base: URLSession
The reactive extension can be accessed through the reactive
instance property and the reactive
static property.
-
Returns a SignalProducer which performs the work associated with an
NSURLSession
Note
This method will not send an error event in the case of a server side error (i.e. when a response with status code other than 200…299 is received).
Declaration
Swift
public func data(with request: URLRequest) -> SignalProducer<(Data, URLResponse), AnyError>
Parameters
request
A request that will be performed when the producer is started
Return Value
A producer that will execute the given request once for each invocation of
start()
.